#!/bin/env ruby
# encoding: utf-8
require_relative '../spec/spec_helper'
require_relative '../spec/commons/user_auth'
require_relative '../spec/commons/check_pages'
require_relative '../spec/commons/report'

describe 'Graphial report page' do
  before {

  }

  context 'when logged in' do
  	it 'then he can work with graphical report page' do
  	  goto 'http://pulse.7bits.it/en/login-page'
  	  user_signs_in()
  	  goto 'http://pulse.7bits.it/en/us/report-dashboard'
  	  check_graph_report_page()
  	end
  end

  context 'when logged in' do
    it 'then text input with date range, format: MMM YYYY. ignores inavlid data ' do
        text_field(class: "form-control input-sm js-reports-rangepicker").click()
        check_interval(3,0,1)
    end  
  end
  

  context 'when logged out' do
    it "then he can't work with graphical report page"  do
	  user_logout()
    end
  end
  	
end